import request from '@/utils/request'

// 查询应急物资和人员列表
export function listRescue(query) {
  return request({
    url: '/safe/rescue/list',
    method: 'get',
    params: query
  })
}

// 查询应急物资和人员详细
export function getRescue(erId) {
  return request({
    url: '/safe/rescue/' + erId,
    method: 'get'
  })
}

// 新增应急物资和人员
export function addRescue(data) {
  return request({
    url: '/safe/rescue',
    method: 'post',
    data: data
  })
}

// 修改应急物资和人员
export function updateRescue(data) {
  return request({
    url: '/safe/rescue',
    method: 'put',
    data: data
  })
}

// 删除应急物资和人员
export function delRescue(erId) {
  return request({
    url: '/safe/rescue/' + erId,
    method: 'delete'
  })
}

// 导出应急物资和人员
export function exportRescue(query) {
  return request({
    url: '/safe/rescue/export',
    method: 'get',
    params: query
  })
}